<?php /* Smarty version Smarty-3.0-RC2, created on 2013-11-17 16:38:06
         compiled from "D:/www/htdocs/web/application/views/admin/pages/pendaftaran_table.tpl" */ ?>
<?php /*%%SmartyHeaderCode:248675288e2dee892a8-42274380%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '3c81ea6fc85b16e48d2d4a2db2dabed4dbb644c2' => 
    array (
      0 => 'D:/www/htdocs/web/application/views/admin/pages/pendaftaran_table.tpl',
      1 => 1384702622,
    ),
  ),
  'nocache_hash' => '248675288e2dee892a8-42274380',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>

<table id=table class="adminlist">
	<thead>
		<tr>
			<th style='text-align:center;'>#</th>
			
			<th id='no_pendaftaran' class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_no_pendaftaran'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">No Pendaftaran</a></th>

			<th id='nama'  class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_nama'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Nama</a></th>
<!--		  
			<th id='tempat_lahir' class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_tempat_lahir'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">T.Lahir</a></th>
-->		  
			<th id='tgl_lahir' class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_tgl_lahir'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">TglLahir</a></th>
		  
			<th id='jenis_kelamin' class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_jenis_kelamin'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Jenis Kelamin</a></th>
			
			<th id='tinggi_badan' class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_tinggi_badan'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Tinggi</a></th>
<!--			
			<th id='agama' class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_agama'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Agama</a></th>
			
			<th id='propinsi_smtaID' class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_propinsi_smtaID'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Prop</a></th>
-->			
			<th id='tahun_lulus' class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_tahun_lulus'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">ThnLulus</a></th>
			
			<th id='jenis_smtaID' class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_jenis_smtaID'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Jenis SMTA</a></th>
			
			<th id='jurusan_smtaID' class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_jurusan_smtaID'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Jurusan SMTA</a></th>
			
			<th id='jurusanID' class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_jurusanID'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Pilihan Jurusan</a></th>
<!--		
			<th id='lokasiID' class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_lokasiID'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">LokTest</a></th>
				
			<th id='mat_4' class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_mat_4'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Mat4</a></th>
			
			<th id='fisika_4' class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_fisika_4'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Fis4</a></th>
			
			<th id='inggris_4' class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_inggris_4'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Ing4</a></th>
			
			<th id='mat_5' class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_mat_5'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Mat5</a></th>
			
			<th id='fisika_5' class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_fisika_5'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Fis5</a></th>
			
			<th id='inggris_5' class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_inggris_5'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Ing5</a></th>
			
			<th id='mat_6' class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_mat_6'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Mat6</a></th>
			
			<th id='fisika_6' class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_fisika_6'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Fis6</a></th>
			
			<th id='inggris_6' class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_inggris_6'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Ing6</a></th>

			<th id='register_date' class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_register_date'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Date</a></th>
			
			<th id='email' class='<?php echo $_smarty_tpl->getVariable('data')->value['sort_email'];?>
' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Email</a></th>
-->		
		</tr>
	</thead>
	
	<tbody>

	<?php if ($_smarty_tpl->getVariable('data')->value['rows']){?>
		<?php  $_smarty_tpl->tpl_vars['i'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('data')->value['rows']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['smarty']->value['foreach']['data']['iteration']=0;
if (count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['i']->key => $_smarty_tpl->tpl_vars['i']->value){
 $_smarty_tpl->tpl_vars['smarty']->value['foreach']['data']['iteration']++;
?>	
			<?php $_smarty_tpl->assign('css',$_smarty_tpl->getVariable('smarty')->value['foreach']['data']['iteration']%2==0 ? "'row0'" : "'row1'",null,null);?>
			
			<tr class=<?php echo $_smarty_tpl->getVariable('css')->value;?>
>
			
				
				<td class='tc'><span class="tag tag-gray"><?php echo $_smarty_tpl->getVariable('smarty')->value['foreach']['data']['iteration']+$_smarty_tpl->getVariable('data')->value['offset'];?>
</span></td>
				<!--
				<td class='edit'>
				
					<a href='<?php echo $_smarty_tpl->getVariable('site')->value['site'];?>
admin/contentForm/<?php echo $_smarty_tpl->tpl_vars['i']->value['no_pendaftaran'];?>
/<?php echo $_smarty_tpl->getVariable('data')->value['order'];?>
/<?php echo $_smarty_tpl->getVariable('data')->value['sort'];?>
/<?php echo $_smarty_tpl->getVariable('data')->value['paging']['c'];?>
/<?php echo $_smarty_tpl->getVariable('data')->value['limit'];?>
'>
					<?php echo $_smarty_tpl->tpl_vars['i']->value['nama'];?>

					</a>
				</td>
				-->
				<td class='tc'><a href='<?php echo $_smarty_tpl->getVariable('site')->value['site'];?>
admin/pendaftaranDetail/<?php echo $_smarty_tpl->tpl_vars['i']->value['no_pendaftaran'];?>
/<?php echo $_smarty_tpl->getVariable('data')->value['order'];?>
/<?php echo $_smarty_tpl->getVariable('data')->value['sort'];?>
/<?php echo $_smarty_tpl->getVariable('data')->value['paging']['c'];?>
/<?php echo $_smarty_tpl->getVariable('data')->value['limit'];?>
'><?php echo $_smarty_tpl->tpl_vars['i']->value['no_pendaftaran'];?>
</a></td>
				
				<td class='tc'><a href='<?php echo $_smarty_tpl->getVariable('site')->value['site'];?>
admin/pendaftaranDetail/<?php echo $_smarty_tpl->tpl_vars['i']->value['no_pendaftaran'];?>
/<?php echo $_smarty_tpl->getVariable('data')->value['order'];?>
/<?php echo $_smarty_tpl->getVariable('data')->value['sort'];?>
/<?php echo $_smarty_tpl->getVariable('data')->value['paging']['c'];?>
/<?php echo $_smarty_tpl->getVariable('data')->value['limit'];?>
'><?php echo $_smarty_tpl->tpl_vars['i']->value['nama'];?>
</a></td>
				
<!--				<td class='tc'><?php echo $_smarty_tpl->tpl_vars['i']->value['tempat_lahir'];?>
</td>	-->
				<td class='tc'><?php echo $_smarty_tpl->tpl_vars['i']->value['tgl_lahir'];?>
</td>
				
				<?php if ($_smarty_tpl->tpl_vars['i']->value['jenis_kelamin']>0){?>
						<td  class='center'>
							Perempuan
								<?php }else{ ?>
						<td  class='center'>
							Laki-laki
				<?php }?>
				
				<td class='tc'><?php echo $_smarty_tpl->tpl_vars['i']->value['tinggi_badan'];?>
</td>
<!--		<td class='tc'><?php echo $_smarty_tpl->tpl_vars['i']->value['propinsiID'];?>
</td>	-->
				<td class='tc'><?php echo $_smarty_tpl->tpl_vars['i']->value['tahun_lulus'];?>
</td>
				<td class='tc'><?php echo $_smarty_tpl->tpl_vars['i']->value['jenis'];?>
</td>
				<td class='tc'><?php echo $_smarty_tpl->tpl_vars['i']->value['jurusan'];?>
</td>
				<td class='tc'><?php echo $_smarty_tpl->tpl_vars['i']->value['jurusan_smta'];?>
</td>
<!--		<td class='tc'><?php echo $_smarty_tpl->tpl_vars['i']->value['lokasiID'];?>
</td>
				<td class='tc'><?php echo $_smarty_tpl->tpl_vars['i']->value['mat_4'];?>
</td>
				<td class='tc'><?php echo $_smarty_tpl->tpl_vars['i']->value['fisika_4'];?>
</td>
				<td class='tc'><?php echo $_smarty_tpl->tpl_vars['i']->value['inggris_4'];?>
</td>
				<td class='tc'><?php echo $_smarty_tpl->tpl_vars['i']->value['mat_5'];?>
</td>
				<td class='tc'><?php echo $_smarty_tpl->tpl_vars['i']->value['fisika_5'];?>
</td>
				<td class='tc'><?php echo $_smarty_tpl->tpl_vars['i']->value['inggris_5'];?>
</td>
				<td class='tc'><?php echo $_smarty_tpl->tpl_vars['i']->value['mat_6'];?>
</td>
				<td class='tc'><?php echo $_smarty_tpl->tpl_vars['i']->value['fisika_6'];?>
</td>
				<td class='tc'><?php echo $_smarty_tpl->tpl_vars['i']->value['inggris_6'];?>
</td>
				<td class='tc'><?php echo $_smarty_tpl->tpl_vars['i']->value['register_date'];?>
</td>
				<td class='tc'><?php echo $_smarty_tpl->tpl_vars['i']->value['email'];?>
</td>				 -->
			</tr>
		<?php }} ?>
	<?php }?>
	</tbody>
	
	<tfoot>
	<tr>
		<td colspan="30">
		<del class="container">
			<div class="pagination"><div class="paging">
			
				<?php if (count($_smarty_tpl->getVariable('data')->value['paging'])>0){?>
				<a class='first' href='<?php echo $_smarty_tpl->getVariable('site')->value['site'];?>
admin/pendaftaran/<?php echo $_smarty_tpl->getVariable('data')->value['order'];?>
/<?php echo $_smarty_tpl->getVariable('data')->value['sort'];?>
/1/<?php echo $_smarty_tpl->getVariable('data')->value['limit'];?>
'></a>
				<a class='prev'  href='<?php echo $_smarty_tpl->getVariable('site')->value['site'];?>
admin/pendaftaran/<?php echo $_smarty_tpl->getVariable('data')->value['order'];?>
/<?php echo $_smarty_tpl->getVariable('data')->value['sort'];?>
/<?php echo $_smarty_tpl->getVariable('data')->value['paging']['p'];?>
/<?php echo $_smarty_tpl->getVariable('data')->value['limit'];?>
'></a>     
				<span>Page <?php echo $_smarty_tpl->getVariable('data')->value['paging']['c'];?>
 of <?php echo $_smarty_tpl->getVariable('data')->value['paging']['l'];?>
 </span>
				<a class='next'  href='<?php echo $_smarty_tpl->getVariable('site')->value['site'];?>
admin/pendaftaran/<?php echo $_smarty_tpl->getVariable('data')->value['order'];?>
/<?php echo $_smarty_tpl->getVariable('data')->value['sort'];?>
/<?php echo $_smarty_tpl->getVariable('data')->value['paging']['n'];?>
/<?php echo $_smarty_tpl->getVariable('data')->value['limit'];?>
'></a>
				<a class='last'  href='<?php echo $_smarty_tpl->getVariable('site')->value['site'];?>
admin/pendaftaran/<?php echo $_smarty_tpl->getVariable('data')->value['order'];?>
/<?php echo $_smarty_tpl->getVariable('data')->value['sort'];?>
/<?php echo $_smarty_tpl->getVariable('data')->value['paging']['l'];?>
/<?php echo $_smarty_tpl->getVariable('data')->value['limit'];?>
'></a>
				<?php }?>
			</div></div>
		</del>
		</td>
	</tr>
	</tfoot>

</table>


<script id="category-script" type="text/javascript">
$(document).ready(function(){
	$("#table thead th").each(
	   function(){
		  $( this ).bind (
			 "click",
			 function(){
				var id   =  $(this).attr('id') ;
				var sort =  $(this).attr('class');
				
				$('#table').load('<?php echo $_smarty_tpl->getVariable('site')->value['site'];?>
adminajax/pendaftaranSorting/' + id + '/' + sort + '/' + <?php echo $_smarty_tpl->getVariable('data')->value['page'];?>
 + '/' + <?php echo $_smarty_tpl->getVariable('data')->value['limit'];?>
);
			 }
		  );
	   }
	);   

	$('.publish a').click( function (e) {
		var id = $(this).attr('id');
		var publish = $(this).attr('class');

		var _post = [{ name:'id', value:id }]
		_post.push({ name:'publish', value:publish });
		
		$.post('<?php echo $_smarty_tpl->getVariable('site')->value['site'];?>
adminajax/contentPublishing/', _post, function(response) {
			//alert(id + '=' + response + '=' + publish);
			
			if (response=="0"){
				$(this).attr('class', '1');
				$('#img_' + id).attr('src', '<?php echo $_smarty_tpl->getVariable('site')->value['assets'];?>
css/img/led-ico/unpublish.png');
			} else if (response=="1"){
				$(this).attr('class','0');
				$('#img_' + id).attr('src', '<?php echo $_smarty_tpl->getVariable('site')->value['assets'];?>
css/img/led-ico/publish.png');
			} else {
				alert(response);
			}
		});
	});
});
</script>